<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- easyui -->
<link rel="stylesheet" type="text/css" href="resources/plugins/easyui/themes/gray/easyui.css" />
<link rel="stylesheet" type="text/css" href="resources/plugins/easyui/themes/icon.css" />
<link rel="stylesheet" type="text/css" href="resources/plugins/fontawesome-4.2.0_ie7/css/font-awesome.min.css" />
<script type="text/javascript" src="resources/plugins/easyui/jquery.min.js"></script>
<script type="text/javascript" src="resources/plugins/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="resources/plugins/easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="resources/plugins/easyui/easyloader.js"></script>  
<script type="text/javascript" src="resources/plugins/easyui/release/jquery.jdirk.min.js"></script>

<title>中医电子病历</title>
<script type="text/javascript">

function fnOpenTCMEMR(){
	///alert("1111"); 
	$.ajax({  
        type : "post",  
        async: false,  
        url : "http://localhost:8080/ZYEMR/login",  
		data : {resource:'52d8ddee-9968-49d0-8106-2abd080dee42', patientId:'p001',doctorId:'d001'},
        dataType : "jsonp",//数据类型为jsonp  
        jsonp: "jsonpCallback",//服务端用于接收callback调用的function名的参数  
        success : function(data){ 
            ///alert("2222" + data[0].openURL); 
             window.open(data[0].openURL,"tcmemrContent");
        },  
        error:function(){  
            alert('fail');  
        }  
    });
	
}

///控制iframe框架宽度、高度
function iFrameHeight() { 
	var main = $(window.parent.document).find("#tcmemrContent");
	var thisheight = $(document).height();
	var thiswidth = $(document).width();
	main.height(thisheight);
	main.width(thiswidth);	
}   

</script>
</head>
<body>
<a href="#" onclick="fnOpenTCMEMR()">中医电子病历</a>
<div title="病历" data-options="fit:true">   
<iframe id="tcmemrContent" name="tcmemrContent" height="100%" scrolling="auto" frameborder="0" onload="iFrameHeight()"></iframe>
 </div>   
</body>
</html>